#ifndef __DEVICE_INTERFACE_H__
#define __DEVICE_INTERFACE_H__

#include <base/base.h>
#include <HAL/driverInterface.h>
#include <HAL/hal.h>

#include <string>
#include <boost/property_tree/ptree.hpp>
#include <boost/shared_ptr.hpp>

namespace ECG
{
namespace HAL
{
/*
 * Device description the real device informations 
 * eg:
 *    tty bade databits stopbits startbit hw etc.
 *
*/  class Device : public CBase 
    {
    public:
        Device(boost::property_tree::ptree hwConf,std::string devPath,std::string var,std::string devName);
        Device();
        ~Device();
        void setHwConf(boost::property_tree::ptree hwConf);
        void setDevPath(std::string path);
        void setOutVar(std::string var);
        void setDevName(std::string name);
        boost::property_tree::ptree &getHwConf();
        std::string &getDevPath();
        std::string &getOutVar();
        std::string &getDevName();
        std::string &getFilterID();
        void setFilterID(std::string ID);
        void setDriver(DriverPtr drv);
    private:
        boost::property_tree::ptree hwConf; // the config of hardware
        std::string devPath; // device path
        std::string outVar; // out put var name in redis
        std::string devName; // device name
        std::string filterID; // use filterID get filter
        DriverPtr driver; // the drvier
    };

}
}

#endif //__DEVICE_INTERFACE_H__
